<jsp:useBean id="cadCliBean" scope="request"
	class="edu.up.beans.ClienteBean" />

<!-- Exemplo: Uso de XML Tags pegando um JAVA BEAN da SESSÃO -->
<jsp:useBean id="userBean" scope="session"
	class="edu.up.beans.ClienteBean" />
<script type="text/javascript">
			function mascara(src, mask){
				var i = src.value.length;
				var saida = mask.substring(0,1);
				var texto = mask.substring(i)
				if (texto.substring(0,1) != saida)
				{
					src.value += texto.substring(0,1);
				}
			} 
			
			function SomenteNumero(e){
			    var tecla=(window.event)?event.keyCode:e.which;   
			    if((tecla>47 && tecla<58)) return true;
			    else{
			    	if (tecla==8 || tecla==0) return true;
				else  return false;
			    }
			}
		</script>

<input type="text" name="cep" maxlength="10" value="<jsp:getProperty property="cep" name="cadCliBean"/>"
onkeypress="mascara(this,'##.###-###');return SomenteNumero(event)"/>

